package com.hua.cloud.consulController;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
public class ConsumerControl {

    @Autowired
    private RestTemplate restTemplate;
    private static  final  String URLNAME="http://consul-provider-service";

    @RequestMapping("/consumer/getInfo")
    public String getInfo(){
      return  restTemplate.getForObject(URLNAME+"/consul/getInfo",String.class);
    }

}
